package com.example.book.mapper;

import com.example.book.domain.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author tong
* @description 针对表【book】的数据库操作Mapper
* @createDate 2023-05-19 14:20:24
* @Entity com.example.book.domain.Book
*/
public interface BookMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Book record);

    int insertSelective(Book record);

    Book selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);

    List<Book> selectBooksByUserId(@Param("userId") Long userId);

    Book selectBookByBookId(Long id);

    List<Book> selectBookByBookName(@Param("name") String name,@Param("userId") Integer userId);
}
